<?php
/**
 * Created by PhpStorm.
 * User: jhon
 * Date: 2018/2/8
 * Time: 14:22
 */
namespace app\api\controller;
use think\Controller;

class Auto extends Controller {


    public function _initialize(){
        $this->checkApiUser();
    }

//    核对api使用者信息
    public function checkApiUser(){
//        var_dump(input());

        $vtype = input('vtype');
        $appid = input('appid');
        $appservice = input('appservice');
        $time = input('time');
        $vresult = input('vresult');

        switch ($vtype){
            case 1:

                $codestr = md5(trim($appid.$appservice.$time));
               /* echo $codestr;
                echo '<br>';
                echo $vresult;*/
                if($codestr == $vresult){

                }else{

                }
                break;
            case 2:

                break;
            default:

                break;
        }
    }

    public function _empty($name)
    {
        return json(['message'=>"非法操作！请检查当前url地址。",'error'=>'8000','data'=>[]]);
    }
}